package com.service.ljl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.dao.ljl.ododao;
import com.dao.ljl.orderdao;
import com.dao.ljl.returndao;
import com.entity.Order;
import com.entity.Repro;

@Service
@Transactional(rollbackFor=ServiceException.class)
public class returnservice {
	@Autowired
	private orderdao orderdao;
	@Autowired
	private returndao returndao;
	
	public void add(Repro repro) {
		Order order=new Order();
		order=orderdao.findOne(repro.getOrder().getOrId());
		repro.setOrder(order);
		returndao.save(repro);
	}

}
